package com.example.demo.controller;

import com.example.demo.annotation.Validate;
import com.example.demo.domain.User;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @RequestMapping("/test")
    public String test(){
        System.out.println("test");
        return "test";
    }

    @RequestMapping("/validate")
    @Validate
    public String validate(@RequestBody User user){

        return "hello";
    }
}
